package com.lhy.admin.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 部门模型
 * </p>
 * @author 86159
 * @date 2021-05-22 16:50:22
 * Copyright (c) 2021 
 */
@Data
@TableName("t_department")
@Schema(description="部门")
public class Department implements Serializable {

    /**
     * 部门ID
     */
    @Schema(description = "部门ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 部门名称
     */
    @Schema(description = "部门名称")
    @TableField("name")
    private String name;

    /**
     * 负责人
     */
    @Schema(description = "负责人")
    @TableField("leader")
    private String leader;

    /**
     * 描述
     */
    @Schema(description = "描述")
    @TableField("description")
    private String description;

    /**
     * 联系电话
     */
    @Schema(description = "联系电话")
    @TableField("tel")
    private String tel;

    /**
     * 上级部门ID
     */
    @Schema(description = "上级部门ID")
    @TableField("parent")
    private Integer parent;

    /**
     * 祖先ID路径
     */
    @Schema(description = "祖先ID路径")
    @TableField("ancestors")
    private String ancestors;

    /**
     * 层级
     */
    @Schema(description = "层级")
    @TableField("level")
    private Integer level;

    /**
     * 优先级
     */
    @Schema(description = "优先级")
    @TableField("priority")
    private Integer priority;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @TableField("created")
    private LocalDateTime created;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @TableField("updated")
    private LocalDateTime updated;


    public static final String ID = "id";
    public static final String NAME = "name";
    public static final String LEADER = "leader";
    public static final String DESCRIPTION = "description";
    public static final String TEL = "tel";
    public static final String PARENT = "parent";
    public static final String ANCESTORS = "ancestors";
    public static final String LEVEL = "level";
    public static final String PRIORITY = "priority";
    public static final String CREATED = "created";
    public static final String UPDATED = "updated";

}
